﻿using System.Windows;
using System.Windows.Input;

namespace CheckNoteWpf
{
    public class NotifyIconViewModel
    {
        /// <summary>
        /// 如果窗口没显示，就显示窗口
        /// </summary>
        public ICommand ShowWindowCommand
        {
            get
            {
                return new DelegateCommand
                {
                    CanExecuteFunc = () => true,
                    CommandAction = () =>
                    {
                        Application.Current.MainWindow?.Show();
                        Application.Current.MainWindow?.Activate();
                    }
                };
            }
        }
    }
}
